
$(document).ready(function () {
$(".register__footer_next").click(function () {
   var username=$(".register__phone").val();
    console.log(username);
    var num=$(".register__phone").val();
    var partten=/^1[3,5,7,8]\d{9}$/;
    if(partten.test(num)===false){
        $('.register__content_phone').html("您的手机号格式错误").css("color","#f00");
        return;
    }
    $.ajax({
        Type:"GET",
        url:"http://192.168.1.66/admin/registtel",
        dataType:"json",
        async:true,
        headers:{"content-type":"application/json"},
        data:{username:username},
        success:function (list) {
           console.log(list);
            console.log(list.code);
            console.log(list.msg);
            console.log(list.code===2);
        },
        error:function () {
            alert("响应成功但有问题");
        }
    })
})
});
